HAL DCMI state and error functions migration

This section provides information about the HAL DCMI state and error functions migration.

HAL DCMI get state

In HAL2, HAL_DCMI_GetState() takes a hal_dcmi_handle_t and reports the driver-level state using the simplified state model. The new HAL_DCMI_GetPipeState() allows querying the state of the DCMI pipe (this split enables finer-grained monitoring when multiple pipes are used the case of DCMIPP peripheral).

HAL1

HAL2

HAL_DCMI_GetState(const DCMI_HandleTypeDef *hdcmi)
HAL_DCMI_GetState(const hal_dcmi_handle_t *hdcmi)
HAL_DCMI_GetPipeState(const hal_dcmi_handle_t *hdcmi,
                      hal_dcmi_pipe_t pipe)

Related concept: Revised and optimized HAL state machine


HAL DCMI get error codes

HAL1

HAL2

HAL_DCMI_GetError(const DCMI_HandleTypeDef *hdcmi)
HAL_DCMI_GetLastErrorCodes(const hal_dcmi_handle_t *hdcmi)

Related concept: Revised and optimized HAL error management